Skip to content

Cap the vulnerabilities tooltip in the software details modal - #53038

Open
ShreyashAgare26 wants to merge 1 commit into
fleetdm:mainfrom
ShreyashAgare26:fix-52810-tooltip-cap
Open

ShreyashAgare26 wants to merge 1 commit into
fleetdm:mainfrom
ShreyashAgare26:fix-52810-tooltip-cap

Conversation

@ShreyashAgare26

@ShreyashAgare26 ShreyashAgare26 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Related issue: Fixes #52810

On My device, open a software title with a lot of CVEs and hover the "+53 more" next to Vulnerabilities. The tooltip lists every hidden CVE in one column. With 57 CVEs it was 887px tall in a 950px window, so it covered the modal it came from, and on a shorter window the bottom was unreachable. Hover tooltips do not scroll.

The list comes from TruncatedTextList, which hands every hidden item to the tooltip. I capped it at 10 with a "+N more" count for the rest. The cap lives in the component, not the call site, so host details, policy labels, and the software library accordion are covered too.

The table cell next to it already caps at 3 (NUM_VULNERABILITIES_IN_TOOLTIP). I used 10 because 3 is sized for an inline cell and would hide 54 of 57 CVEs in a modal. 10 keeps the tooltip near 200px. Say the word and I will match 3.

Checklist for submitter

  • Changes file added for user-visible changes in changes/.

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

New test in TruncatedTextList.tests.tsx renders 57 items and checks the tooltip lists 10 and counts the other 46. It fails without the fix.

Manual check in a local server: My device > Software > 1Password with 57 CVEs > hover "+52 more". Also in Storybook with a new ManyItems story, where the tooltip measures 936px before and 194px after.

AI

AI: Claude Code (claude-opus-5[1m])

Frontend

  • Attached a screenshot or screen recording of each user-visible change. For changes to existing UI, show the before and after.

Before, 56 CVEs in one column at 936px, top and bottom off screen:

before

After, 10 CVEs and a "+46 more" count at 194px:

after

Summary by CodeRabbit

  • Bug Fixes

    • Improved truncated-list tooltips in the software details modal. They now show up to 10 vulnerability items followed by a count of additional items, preventing the tooltip from extending beyond the screen.
  • Tests

    • Added coverage for long vulnerability lists to verify the displayed items and remaining-item count.

TruncatedTextList passed every hidden item to its tooltip, so a title with
57 CVEs opened a 936px tooltip that covered the modal and ran off the
screen. A hover tooltip cannot scroll, so the rest was unreachable.

Cap the tooltip at 10 items with a "+N more" count. The cap lives in the
component so every caller is covered, not just the software details modal.
@ShreyashAgare26
ShreyashAgare26 requested a review from a team as a code owner September 11, 2026 14:17
@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.97%. Comparing base (0055a05) to head (924dc1f).
⚠️ Report is 70 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #53038      +/-   ##
==========================================
+ Coverage   75.94%   75.97%   +0.03%     
==========================================
  Files        4109     4114       +5     
  Lines      248789   248961     +172     
  Branches    14332    14406      +74     
==========================================
+ Hits       188932   189140     +208     
+ Misses      59681    59644      -37     
- Partials      176      177       +1     
Flag Coverage Δ
frontend 68.28% <100.00%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: bebb650e-83e3-4267-a658-108dcfdaa911

📥 Commits

Reviewing files that changed from the base of the PR and between 114724c and 924dc1f.

📒 Files selected for processing (4)
  • changes/52810-cap-truncated-text-list-tooltip
  • frontend/components/TruncatedTextList/TruncatedTextList.stories.tsx
  • frontend/components/TruncatedTextList/TruncatedTextList.tests.tsx
  • frontend/components/TruncatedTextList/TruncatedTextList.tsx

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


Walkthrough

TruncatedTextList now limits tooltip content to 10 hidden items and appends a +N more count for the remaining items. A Storybook story demonstrates the behavior with 57 CVEs in a 360px frame. A test verifies the first 10 hidden items appear and the remaining 46 are summarized. The changelog describes the software details modal fix.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 924dc

The capped tooltip behavior is covered for large lists, and no actionable current-head risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #52810 requires the software-details vulnerability tooltip to stop rendering all hidden CVEs and to show a remaining-item count. TruncatedTextList now renders at most 10 tooltip items and appe…
Out of Scope Changes check ✅ Passed The changes are limited to the shared TruncatedTextList behavior, its automated test, its Storybook example, and the changelog entry. The shared component change supports the linked issue and its ot…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Title check ✅ Passed The title clearly and concisely describes the primary change: limiting the vulnerabilities tooltip in the software details modal.
Description check ✅ Passed The description identifies the related issue, explains the problem and solution, documents automated and manual testing, includes the required AI section, and provides before-and-after screenshots. Ir…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

My device: software details tooltip lists every CVE instead of capping

2 participants